package com.cscj.android.repository.repo.search

import com.cscj.android.repository.db.entity.HotSearchEntity
import com.cscj.android.repository.db.entity.SearchEngineEntity
import com.cscj.android.repository.db.entity.SearchHistoryEntity
import kotlinx.coroutines.flow.Flow

interface SearchRepository {

    fun searchList(): Flow<List<SearchHistoryEntity>>

    suspend fun saveSearchHistory(keyword: String)

    fun searchEngines(): Flow<List<SearchEngineEntity>>

    suspend fun switchEngine(id: Int)


    suspend fun deleteSearchHistory(searchHistoryEntity: SearchHistoryEntity)


    suspend fun deleteAllSearchHistory()

    fun currentSearchEngine(): Flow<SearchEngineEntity?>


    fun hotSearchList(sourceType: Int): Flow<List<HotSearchEntity>>


    fun searchRecommendList(): Flow<List<HotSearchEntity>>

    fun searchRecommendNewList(): Flow<List<HotSearchEntity>>


    suspend fun loadHotSearch()

}